package com.test.dazuoye.service.serviceImpl;

import com.test.dazuoye.domain.YongHu;
import com.test.dazuoye.dao.YongHuDao;
import com.test.dazuoye.service.YongHuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @date 2020/6/4-10:15
 */
@Service
public class YongHuServiceImpl implements YongHuService {

    @Autowired
    YongHuDao yongHuDao;


    @Override
    public List<YongHu> findAll() {
        List<YongHu> all = yongHuDao.findAll();
        return all;
    }

    @Override
    public void saveYongHu(YongHu yongHu) {
        yongHuDao.saveYongHu(yongHu);
    }

    @Override
    public void deleteYongHu(String name) {

        yongHuDao.deleteYongHu(name);
    }

    @Override
    public YongHu findOne(String name) {
        YongHu one = yongHuDao.findOne(name);
        return one;
    }


}
